﻿namespace HuaWei
{
    using DevExpress.Utils;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Grid;
    using HuaWei.CommClass;
    using HuaWei.CommComp;
    using HuaWei.Common;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class FrmBGLSelect : FrmBase
    {
        private BindingSource bindingSource;
        private BindingSource bindingSource1;
        private BindingSource bindingSource2;
        private SimpleButton btnCancel;
        private SimpleButton btnOK;
        private GridColumn colBBWBGHTZSL;
        private GridColumn colBGZJL;
        private GridColumn colBQJLS;
        private GridColumn colDW;
        private GridColumn colIsSelect;
        //private GridColumn colJLS;
        private GridColumn colQDBH;
        //private GridColumn colSYSL;
        private GridColumn colXMMC;
        private TextEdit edtBGLH;
        private DateEdit edtBGLRQ;
        private GridColumn gridColumn;
        private GridColumn gridColumn1;
        private GridControl gridControl2;
        private GridControl gridControl4;
        private GridView gridView2;
        private GridView gridView3;
        private GroupControl groupControl1;
        private IContainer icontainer1 = null;
        private LabelControl labelControl1;
        private LabelControl labelControl12;
        private LabelControl labelControl13;
        private LabelControl labelControl14;
        private LabelControl labelControl2;
        private LabelControl labelControl3;
        private LabelControl labelControl4;
        private LabelControl labelControl5;
        private LabelControl labelControl10;
        private LabelControl labelControl6;
        private LabelControl labelControl8;
        private MemoEdit memoEdit1;
        private PanelControl panelControl1;
        private PanelControl panelControl4;
        private RepositoryItemCheckEdit repositoryItemCheckEdit1;
        private SplitterControl splitterControl1;
        private SplitterControl splitterControl2;
        private TextEdit textEdit;
        private TextEdit textEdit1;
        private TextEdit textEdit2;
        private TextEdit textEdit3;
        private TextEdit textEdit4;
        private TextEdit textEdit5;
        private TextEdit textEdit6;
        private TextEdit textEdit7;
        private TextEdit textEdit8;
        private GridColumn vroAaJyIa;

        public FrmBGLSelect()
        {
            this.InitializeComponent();
            objId = string.Empty;
            this.LoadData();
        }

        private void bindingSource_PositionChanged(object sender, EventArgs e)
        {
            this.method1();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.icontainer1 != null))
            {
                this.icontainer1.Dispose();
            }
            base.Dispose(disposing);
        }

        private void FrmBGLSelect_Load(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void InitializeComponent()
        {
            this.icontainer1 = new Container();
            GridLevelNode node = new GridLevelNode();
            this.bindingSource = new BindingSource(this.icontainer1);
            //base.dataSets = new dataSets1();
            this.gridControl4 = new GridControl();
            this.bindingSource1 = new BindingSource(this.icontainer1);
            this.gridView2 = new GridView();
            this.colQDBH = new GridColumn();
            this.colXMMC = new GridColumn();
            this.colDW = new GridColumn();
            this.colBQJLS = new GridColumn();
            this.gridColumn = new GridColumn();
            this.colBBWBGHTZSL = new GridColumn();
            this.colBGZJL = new GridColumn();
            this.vroAaJyIa = new GridColumn();
            //this.colJLS = new GridColumn();
            //this.colSYSL = new GridColumn();
            this.colIsSelect = new GridColumn();
            this.repositoryItemCheckEdit1 = new RepositoryItemCheckEdit();
            this.btnCancel = new SimpleButton();
            this.btnOK = new SimpleButton();
            this.bindingSource2 = new BindingSource(this.icontainer1);
            this.panelControl1 = new PanelControl();
            this.memoEdit1 = new MemoEdit();
            this.groupControl1 = new GroupControl();
            this.panelControl4 = new PanelControl();
            this.splitterControl1 = new SplitterControl();
            this.gridControl2 = new GridControl();
            this.gridView3 = new GridView();
            this.gridColumn1 = new GridColumn();
            this.splitterControl2 = new SplitterControl();
            this.textEdit = new TextEdit();
            this.textEdit2 = new TextEdit();
            this.labelControl14 = new LabelControl();
            this.labelControl12 = new LabelControl();
            this.edtBGLRQ = new DateEdit();
            this.labelControl13 = new LabelControl();
            this.textEdit7 = new TextEdit();
            this.labelControl8 = new LabelControl();
            this.textEdit6 = new TextEdit();
            this.labelControl6 = new LabelControl();
            this.textEdit1 = new TextEdit();
            this.textEdit8 = new TextEdit();
            this.labelControl5 = new LabelControl();
            this.labelControl10 = new LabelControl();
            this.textEdit5 = new TextEdit();
            this.textEdit4 = new TextEdit();
            this.textEdit3 = new TextEdit();
            this.labelControl4 = new LabelControl();
            this.labelControl3 = new LabelControl();
            this.labelControl2 = new LabelControl();
            this.labelControl1 = new LabelControl();
            this.edtBGLH = new TextEdit();
            base.ds.BeginInit();
            base.dsQuery.BeginInit();
            ((ISupportInitialize) this.bindingSource).BeginInit();
            this.gridControl4.BeginInit();
            ((ISupportInitialize) this.bindingSource1).BeginInit();
            this.gridView2.BeginInit();
            this.repositoryItemCheckEdit1.BeginInit();
            ((ISupportInitialize) this.bindingSource2).BeginInit();
            this.panelControl1.BeginInit();
            this.panelControl1.SuspendLayout();
            this.memoEdit1.Properties.BeginInit();
            this.groupControl1.BeginInit();
            this.groupControl1.SuspendLayout();
            this.panelControl4.BeginInit();
            this.panelControl4.SuspendLayout();
            this.gridControl2.BeginInit();
            this.gridView3.BeginInit();
            this.textEdit.Properties.BeginInit();
            this.textEdit2.Properties.BeginInit();
            this.edtBGLRQ.Properties.VistaTimeProperties.BeginInit();
            this.edtBGLRQ.Properties.BeginInit();
            this.textEdit7.Properties.BeginInit();
            this.textEdit6.Properties.BeginInit();
            this.textEdit1.Properties.BeginInit();
            this.textEdit8.Properties.BeginInit();
            this.textEdit5.Properties.BeginInit();
            this.textEdit4.Properties.BeginInit();
            this.textEdit3.Properties.BeginInit();
            this.edtBGLH.Properties.BeginInit();
            base.SuspendLayout();
            this.bindingSource.DataMember = "BGL";
            this.gridControl4.DataSource = this.bindingSource1;
            this.gridControl4.Dock = DockStyle.Fill;
            this.gridControl4.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gridControl4.Location = new Point(0x77, 0x10a);
            this.gridControl4.MainView = this.gridView2;
            this.gridControl4.Name = "gridControl4";
            this.gridControl4.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemCheckEdit1 });
            this.gridControl4.Size = new Size(0x3bd, 0x101);
            this.gridControl4.TabIndex = 15;
            this.gridControl4.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView2 });
            this.bindingSource1.DataMember = "BGLQD";
            this.gridView2.Columns.AddRange(new GridColumn[] { this.colQDBH, this.colXMMC, this.colDW, this.colBQJLS, this.gridColumn, this.colBBWBGHTZSL, this.colBGZJL, this.vroAaJyIa, this.colIsSelect });
            this.gridView2.GridControl = this.gridControl4;
            this.gridView2.Name = "gridView2";
            this.gridView2.OptionsCustomization.AllowFilter = false;
            this.gridView2.OptionsCustomization.AllowGroup = false;
            this.gridView2.OptionsCustomization.AllowSort = false;
            this.gridView2.OptionsNavigation.EnterMoveNextColumn = true;
            this.gridView2.OptionsView.ColumnAutoWidth = false;
            this.gridView2.OptionsView.ShowGroupPanel = false;
            this.colQDBH.Caption = "清单编号";
            this.colQDBH.FieldName = "QDBH";
            this.colQDBH.Name = "colQDBH";
            this.colQDBH.OptionsColumn.AllowEdit = false;
            this.colQDBH.OptionsColumn.ReadOnly = true;
            this.colQDBH.Tag = "-3";
            this.colQDBH.Visible = true;
            this.colQDBH.VisibleIndex = 0;
            this.colQDBH.Width = 0x43;
            this.colXMMC.Caption = "项目名称";
            this.colXMMC.FieldName = "QDMC";
            this.colXMMC.Name = "colXMMC";
            this.colXMMC.OptionsColumn.AllowEdit = false;
            this.colXMMC.OptionsColumn.ReadOnly = true;
            this.colXMMC.Tag = "-3";
            this.colXMMC.Visible = true;
            this.colXMMC.VisibleIndex = 1;
            this.colXMMC.Width = 0xc0;
            this.colDW.Caption = "单位";
            this.colDW.FieldName = "DW";
            this.colDW.Name = "colDW";
            this.colDW.OptionsColumn.AllowEdit = false;
            this.colDW.OptionsColumn.ReadOnly = true;
            this.colDW.Tag = "-3";
            this.colDW.Visible = true;
            this.colDW.VisibleIndex = 2;
            this.colDW.Width = 0x26;
            this.colBQJLS.Caption = "单价";
            this.colBQJLS.FieldName = "DJ";
            this.colBQJLS.Name = "colBQJLS";
            this.colBQJLS.OptionsColumn.ReadOnly = true;
            this.colBQJLS.Tag = "-3";
            this.colBQJLS.Visible = true;
            this.colBQJLS.VisibleIndex = 3;
            this.colBQJLS.Width = 0x33;
            this.gridColumn.Caption = "本部位原图纸数量";
            this.gridColumn.FieldName = "BBWYTZSL";
            this.gridColumn.Name = "colBBWYTZSL";
            this.gridColumn.OptionsColumn.ReadOnly = true;
            this.gridColumn.Tag = "-3";
            this.gridColumn.Visible = true;
            this.gridColumn.VisibleIndex = 4;
            this.gridColumn.Width = 0x6c;
            this.colBBWBGHTZSL.Caption = "本部位变更后图纸数量";
            this.colBBWBGHTZSL.FieldName = "BBWBGHTZSL";
            this.colBBWBGHTZSL.Name = "colBBWBGHTZSL";
            this.colBBWBGHTZSL.OptionsColumn.ReadOnly = true;
            this.colBBWBGHTZSL.Tag = "-3";
            this.colBBWBGHTZSL.Visible = true;
            this.colBBWBGHTZSL.VisibleIndex = 5;
            this.colBBWBGHTZSL.Width = 0x84;
            this.colBGZJL.Caption = "变更增减数量";
            this.colBGZJL.FieldName = "BGZJL";
            this.colBGZJL.Name = "colBGZJL";
            this.colBGZJL.OptionsColumn.ReadOnly = true;
            this.colBGZJL.Tag = "-3";
            this.colBGZJL.Visible = true;
            this.colBGZJL.VisibleIndex = 6;
            this.colBGZJL.Width = 0x54;
            this.vroAaJyIa.Caption = "变更增减金额";
            this.vroAaJyIa.FieldName = "BGZJJE";
            this.vroAaJyIa.Name = "colBGZJJE";
            this.vroAaJyIa.OptionsColumn.ReadOnly = true;
            this.vroAaJyIa.Tag = "-3";
            this.vroAaJyIa.Visible = true;
            this.vroAaJyIa.VisibleIndex = 7;
            this.vroAaJyIa.Width = 0x55;
            //this.colJLS.Caption = "累计计量";
            //this.colJLS.FieldName = "jls";
            //this.colJLS.Name = "colJLS";
            //this.colJLS.OptionsColumn.ReadOnly = true;
            //this.colJLS.Tag = "-3";
            //this.colJLS.Visible = true;
            //this.colJLS.VisibleIndex = 8;
            //this.colSYSL.Caption = "剩余数量";
            //this.colSYSL.FieldName = "sysl";
            //this.colSYSL.Name = "colSYSL";
            //this.colSYSL.OptionsColumn.ReadOnly = true;
            //this.colSYSL.Tag = "-3";
            //this.colSYSL.Visible = true;
            //this.colSYSL.VisibleIndex = 9;
            //this.colSYSL.Width = 60;
            this.colIsSelect.Caption = "勾选";
            this.colIsSelect.FieldName = "IsSelect";
            this.colIsSelect.Name = "colIsSelect";
            this.colIsSelect.Visible = true;
            this.colIsSelect.VisibleIndex = 10;
            this.colIsSelect.Width = 0x24;
            this.repositoryItemCheckEdit1.AutoHeight = false;
            this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1";
            this.repositoryItemCheckEdit1.NullText = "0";
            this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.btnCancel.Location = new Point(0x386, 2);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(50, 0x17);
            this.btnCancel.TabIndex = 1;
            this.btnCancel.Text = "取消";
            this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.btnOK.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.btnOK.Location = new Point(0x34e, 2);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new Size(50, 0x17);
            this.btnOK.TabIndex = 0;
            this.btnOK.Text = "确定";
            this.btnOK.Click += new EventHandler(this.lquywmUul);
            this.bindingSource2.DataMember = "BGLQD";
            this.panelControl1.Controls.Add(this.btnCancel);
            this.panelControl1.Controls.Add(this.btnOK);
            this.panelControl1.Dock = DockStyle.Top;
            this.panelControl1.Location = new Point(0x77, 0);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new Size(0x3bd, 0x1c);
            this.panelControl1.TabIndex = 0x12;
            this.memoEdit1.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGLNR", true));
            this.memoEdit1.Dock = DockStyle.Fill;
            this.memoEdit1.Location = new Point(2, 0x17);
            this.memoEdit1.Name = "memoEdit1";
            this.memoEdit1.Properties.ReadOnly = true;
            this.memoEdit1.Size = new Size(0x3b9, 0x65);
            this.memoEdit1.TabIndex = 0;
            this.memoEdit1.Tag = "-3";
            this.groupControl1.Controls.Add(this.memoEdit1);
            this.groupControl1.Dock = DockStyle.Top;
            this.groupControl1.Location = new Point(0x77, 0x86);
            this.groupControl1.Name = "groupControl1";
            this.groupControl1.Size = new Size(0x3bd, 0x7e);
            this.groupControl1.TabIndex = 0x11;
            this.groupControl1.Text = "变更令内容";
            this.panelControl4.Controls.Add(this.textEdit);
            this.panelControl4.Controls.Add(this.textEdit2);
            this.panelControl4.Controls.Add(this.labelControl14);
            this.panelControl4.Controls.Add(this.labelControl12);
            this.panelControl4.Controls.Add(this.edtBGLRQ);
            this.panelControl4.Controls.Add(this.labelControl13);
            this.panelControl4.Controls.Add(this.textEdit7);
            this.panelControl4.Controls.Add(this.labelControl8);
            this.panelControl4.Controls.Add(this.textEdit6);
            this.panelControl4.Controls.Add(this.labelControl6);
            this.panelControl4.Controls.Add(this.textEdit1);
            this.panelControl4.Controls.Add(this.textEdit8);
            this.panelControl4.Controls.Add(this.labelControl5);
            this.panelControl4.Controls.Add(this.labelControl10);
            this.panelControl4.Controls.Add(this.textEdit5);
            this.panelControl4.Controls.Add(this.textEdit4);
            this.panelControl4.Controls.Add(this.textEdit3);
            this.panelControl4.Controls.Add(this.labelControl4);
            this.panelControl4.Controls.Add(this.labelControl3);
            this.panelControl4.Controls.Add(this.labelControl2);
            this.panelControl4.Controls.Add(this.labelControl1);
            this.panelControl4.Controls.Add(this.edtBGLH);
            this.panelControl4.Dock = DockStyle.Top;
            this.panelControl4.Location = new Point(0x77, 0x1c);
            this.panelControl4.Name = "panelControl4";
            this.panelControl4.Size = new Size(0x3bd, 0x6a);
            this.panelControl4.TabIndex = 0x10;
            this.panelControl4.Tag = "-3";
            this.splitterControl1.Location = new Point(0x71, 0);
            this.splitterControl1.Name = "splitterControl1";
            this.splitterControl1.Size = new Size(6, 0x20b);
            this.splitterControl1.TabIndex = 0x17;
            this.splitterControl1.TabStop = false;
            this.gridControl2.DataSource = this.bindingSource;
            this.gridControl2.Dock = DockStyle.Left;
            this.gridControl2.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gridControl2.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gridControl2.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            node.RelationName = "Level1";
            this.gridControl2.LevelTree.Nodes.AddRange(new GridLevelNode[] { node });
            this.gridControl2.Location = new Point(0, 0);
            this.gridControl2.MainView = this.gridView3;
            this.gridControl2.Name = "gridControl2";
            this.gridControl2.Size = new Size(0x71, 0x20b);
            this.gridControl2.TabIndex = 0x18;
            this.gridControl2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView3 });
            this.gridView3.Columns.AddRange(new GridColumn[] { this.gridColumn1 });
            this.gridView3.GridControl = this.gridControl2;
            this.gridView3.Name = "gridView3";
            this.gridView3.OptionsCustomization.AllowFilter = false;
            this.gridView3.OptionsCustomization.AllowGroup = false;
            this.gridView3.OptionsCustomization.AllowSort = false;
            this.gridView3.OptionsNavigation.EnterMoveNextColumn = true;
            this.gridView3.OptionsView.ColumnAutoWidth = false;
            this.gridView3.OptionsView.ShowGroupPanel = false;
            this.gridView3.OptionsView.ShowIndicator = false;
            this.gridColumn1.Caption = "变更令号";
            this.gridColumn1.FieldName = "BGLH";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.OptionsColumn.AllowEdit = false;
            this.gridColumn1.OptionsColumn.ReadOnly = true;
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.gridColumn1.Width = 0x67;
            this.splitterControl2.Dock = DockStyle.Top;
            this.splitterControl2.Location = new Point(0x77, 260);
            this.splitterControl2.Name = "splitterControl2";
            this.splitterControl2.Size = new Size(0x3bd, 6);
            this.splitterControl2.TabIndex = 0x19;
            this.splitterControl2.TabStop = false;
            this.textEdit.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BW", true));
            this.textEdit.Location = new Point(0x205, 0x4c);
            this.textEdit.Name = "textEdit12";
            this.textEdit.Properties.ReadOnly = true;
            this.textEdit.Size = new Size(268, 0x15);
            this.textEdit.TabIndex = 0x30;
            this.textEdit.Tag = "-3";
            this.textEdit8.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGLXH", true));
            this.textEdit8.Location = new Point(690, 6);
            this.textEdit8.Name = "textEdit8";
            this.textEdit8.Properties.ReadOnly = true;
            this.textEdit8.Size = new Size(95, 22);
            this.textEdit8.TabIndex = 0x30;
            this.textEdit.Tag = "-3";
            this.textEdit2.DataBindings.Add(new Binding("EditValue", this.bindingSource, "QQZH", true));
            this.textEdit2.Location = new Point(0x205, 0x35);
            this.textEdit2.Name = "textEdit2";
            this.textEdit2.Properties.ReadOnly = true;
            this.textEdit2.Size = new Size(268, 0x15);
            this.textEdit2.TabIndex = 0x2f;
            this.textEdit2.Tag = "-3";
            this.labelControl14.Location = new Point(0x1e7, 0x4f);
            this.labelControl14.Name = "labelControl14";
            this.labelControl14.Size = new Size(0x18, 14);
            this.labelControl14.TabIndex = 0x2e;
            this.labelControl14.Text = "部位";
            this.labelControl12.Location = new Point(0x1cf, 0x38);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new Size(0x30, 14);
            this.labelControl12.TabIndex = 0x2d;
            this.labelControl12.Text = "起讫桩号";
            //this.edtBGLRQ.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGLRQ", true));
            this.edtBGLRQ.EditValue = null;
            this.edtBGLRQ.Location = new Point(0x55, 6);
            this.edtBGLRQ.Name = "edtBGLRQ";
            this.edtBGLRQ.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.edtBGLRQ.Properties.ReadOnly = true;
            this.edtBGLRQ.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.edtBGLRQ.Size = new Size(100, 0x15);
            this.edtBGLRQ.TabIndex = 0x2c;
            this.edtBGLRQ.Tag = "-3";
            this.labelControl13.Location = new Point(0x1f, 9);
            this.labelControl13.Name = "labelControl13";
            this.labelControl13.Size = new Size(0x30, 14);
            this.labelControl13.TabIndex = 0x2b;
            this.labelControl13.Text = "签发日期";
            this.textEdit7.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGTM", true));
            this.textEdit7.Location = new Point(0x102, 0x4c);
            this.textEdit7.Name = "textEdit7";
            this.textEdit7.Properties.ReadOnly = true;
            this.textEdit7.Size = new Size(0xb5, 0x15);
            this.textEdit7.TabIndex = 0x2a;
            this.textEdit7.Tag = "-3";
            this.labelControl8.Location = new Point(0xcc, 0x4f);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new Size(0x30, 14);
            this.labelControl8.TabIndex = 0x29;
            this.labelControl8.Text = "变更图名";
            this.textEdit6.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGTH", true));
            this.textEdit6.Location = new Point(0x55, 0x4c);
            this.textEdit6.Name = "textEdit6";
            this.textEdit6.Properties.ReadOnly = true;
            this.textEdit6.Size = new Size(0x6f, 0x15);
            this.textEdit6.TabIndex = 40;
            this.textEdit6.Tag = "-3";
            this.labelControl6.Location = new Point(0x1f, 0x4f);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new Size(0x30, 14);
            this.labelControl6.TabIndex = 0x27;
            this.labelControl6.Text = "变更图号";
            this.textEdit1.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGZJE", true));
            this.textEdit1.Location = new Point(0x1f0, 6);
            this.textEdit1.Name = "textEdit1";
            this.textEdit1.Properties.DisplayFormat.FormatString = "0";
            this.textEdit1.Properties.DisplayFormat.FormatType = FormatType.Numeric;
            this.textEdit1.Properties.EditFormat.FormatString = "0";
            this.textEdit1.Properties.EditFormat.FormatType = FormatType.Numeric;
            this.textEdit1.Properties.ReadOnly = true;
            this.textEdit1.Size = new Size(0x5e, 0x15);
            this.textEdit1.TabIndex = 0x26;
            this.textEdit1.Tag = "-3";
            this.labelControl5.Location = new Point(430, 9);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new Size(60, 14);
            this.labelControl5.TabIndex = 0x25;
            this.labelControl5.Text = "变更总金额";
            this.labelControl10.Location = new Point(630, 9);
            this.labelControl10.Name = "labelControl10";
            this.labelControl10.Size = new Size(60, 14);
            this.labelControl10.TabIndex = 0x25;
            this.labelControl10.Text = "审批文号";
            this.textEdit5.DataBindings.Add(new Binding("EditValue", this.bindingSource, "YTM", true));
            this.textEdit5.Location = new Point(0x102, 0x35);
            this.textEdit5.Name = "textEdit5";
            this.textEdit5.Properties.ReadOnly = true;
            this.textEdit5.Size = new Size(0xb5, 0x15);
            this.textEdit5.TabIndex = 0x24;
            this.textEdit5.Tag = "-3";
            this.textEdit4.DataBindings.Add(new Binding("EditValue", this.bindingSource, "YTH", true));
            this.textEdit4.Location = new Point(0x55, 0x35);
            this.textEdit4.Name = "textEdit4";
            this.textEdit4.Properties.ReadOnly = true;
            this.textEdit4.Size = new Size(0x6f, 0x15);
            this.textEdit4.TabIndex = 0x23;
            this.textEdit4.Tag = "-3";
            this.textEdit3.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGLQDMC", true));
            this.textEdit3.Location = new Point(0x55, 30);
            this.textEdit3.Name = "textEdit3";
            this.textEdit3.Properties.ReadOnly = true;
            this.textEdit3.Size = new Size(700, 0x15);
            this.textEdit3.TabIndex = 0x22;
            this.textEdit3.Tag = "-3";
            this.labelControl4.Location = new Point(0xd8, 0x38);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new Size(0x24, 14);
            this.labelControl4.TabIndex = 0x21;
            this.labelControl4.Text = "原图名";
            this.labelControl3.Location = new Point(0x2b, 0x38);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new Size(0x24, 14);
            this.labelControl3.TabIndex = 0x20;
            this.labelControl3.Text = "原图号";
            this.labelControl2.Location = new Point(0x13, 0x21);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new Size(60, 14);
            this.labelControl2.TabIndex = 0x1f;
            this.labelControl2.Text = "变更令名称";
            this.labelControl1.Location = new Point(0xcb, 9);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new Size(0x34, 14);
            this.labelControl1.TabIndex = 30;
            this.labelControl1.Text = "变更令号 ";
            this.edtBGLH.DataBindings.Add(new Binding("EditValue", this.bindingSource, "BGLH", true));
            this.edtBGLH.Location = new Point(0x102, 6);
            this.edtBGLH.Name = "edtBGLH";
            this.edtBGLH.Properties.ReadOnly = true;
            this.edtBGLH.Size = new Size(0x84, 0x15);
            this.edtBGLH.TabIndex = 0x1d;
            this.edtBGLH.Tag = "-3";
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize = new Size(0x434, 0x20b);
            base.Controls.Add(this.gridControl4);
            base.Controls.Add(this.splitterControl2);
            base.Controls.Add(this.groupControl1);
            base.Controls.Add(this.panelControl4);
            base.Controls.Add(this.panelControl1);
            base.Controls.Add(this.splitterControl1);
            base.Controls.Add(this.gridControl2);
            base.Name = "FrmBGLSelect";
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text = "变更令选择";
            base.Load += new EventHandler(this.FrmBGLSelect_Load);
            base.ds.EndInit();
            base.dsQuery.EndInit();
            ((ISupportInitialize) this.bindingSource).EndInit();
            base.dataSets.EndInit();
            this.gridControl4.EndInit();
            ((ISupportInitialize) this.bindingSource1).EndInit();
            this.gridView2.EndInit();
            this.repositoryItemCheckEdit1.EndInit();
            ((ISupportInitialize) this.bindingSource2).EndInit();
            this.panelControl1.EndInit();
            this.panelControl1.ResumeLayout(false);
            this.memoEdit1.Properties.EndInit();
            this.groupControl1.EndInit();
            this.groupControl1.ResumeLayout(false);
            this.panelControl4.EndInit();
            this.panelControl4.ResumeLayout(false);
            this.panelControl4.PerformLayout();
            this.gridControl2.EndInit();
            this.gridView3.EndInit();
            this.textEdit.Properties.EndInit();
            this.textEdit2.Properties.EndInit();
            this.edtBGLRQ.Properties.VistaTimeProperties.EndInit();
            this.edtBGLRQ.Properties.EndInit();
            this.textEdit7.Properties.EndInit();
            this.textEdit6.Properties.EndInit();
            this.textEdit1.Properties.EndInit();
            this.textEdit5.Properties.EndInit();
            this.textEdit4.Properties.EndInit();
            this.textEdit3.Properties.EndInit();
            this.edtBGLH.Properties.EndInit();
            base.ResumeLayout(false);
        }

        public override void LoadedForm()
        {
            this.bindingSource.DataSource = base.dsQuery.Tables["BGL"];
            DataTable table = base.dsQuery.Tables["BGLQD"];
            this.bindingSource.PositionChanged += new EventHandler(this.bindingSource_PositionChanged);
            this.bindingSource1.DataSource = table;
            DHelp.AddColumnSelect(table);
            this.method1();
            base.LoadedForm();
        }

        public override void LoadingData()
        {
            base.LoadingData();
            string exeStr = "select * from BGL " + Class28.smethod1();
            base.dsQuery.Merge(base.ida.ExecuteDataSet(exeStr, CommandType.Text, "BGL"));
            exeStr = CHelp.smethod(string.Format(CSQL._str, GParams._BDID));
            base.dsQuery.Merge(base.ida.ExecuteDataSet(exeStr, CommandType.Text, "BGLQD"));
        }

        private void lquywmUul(object sender, EventArgs e)
        {
            //DataRow[] drs = dsQuery.Tables["BGLQD"].Select("IsSelect=1");
            //foreach (DataRow dr in drs)
            //{
            //    if (dr["BGZJJE"] != DBNull.Value && Convert.ToDecimal(dr["BGZJJE"]) < 0)
            //    {
            //        MessageBox.Show("清单金额不能为负数！");
            //        return;
            //    }
            //}
            base.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        public string objId { get; set; }
        private void method1()
        {
            objId = DHelp.GetObjId(this.bindingSource);
            this.bindingSource1.Sort = "pid";
            this.bindingSource1.Filter = "pid='" + objId + "'";
        }
    }
}

